package xiaohu.day0.HJ3;

import java.util.Arrays;
import java.util.Scanner;

public class Main2 {
    //法二：先排序、在去重
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int N = scanner.nextInt();
            int[] ints = new int[N];
            for (int i = 0; i < N; i++) {
                ints[i] = scanner.nextInt();
            }
            Arrays.stream(ints).sorted().distinct().forEach(System.out::println);
        }
    }
}
